<%-- 
    Document   : HinhAnhContent
    Created on : Oct 27, 2011, 2:39:59 PM
    Author     : Admin
--%>

<%@page import="model.dao.hinhAnhDAO"%>
<%@page import="model.pojo.Hinhanh"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<div>
    <form id="frmHinhAnh" name="frmHinhAnh" method="post" action="HinhAnhController?Action=XuLy">
        <table width="400" border="0" align="center">
            <tr>
                <td colspan="3" bgcolor="#999999"><div align="center"><strong>HÌNH ẢNH</strong></div></td>
            </tr>

            <tr>
                <td width="82" bgcolor="#999999">Mã Deal</td>

                <td width="149" bgcolor="#999999"><label for="ddMaDeal"></label>

                    <select name="cbbMaDeal">
                        <option >
                            -- Chọn Mã Deal --
                        </option>
                        <%
                            List<Hinhanh> ds = (List<Hinhanh>) request.getAttribute("hinhanh");
                            for (int i = 0; i < ds.size(); i++) {
                                Hinhanh ha = ds.get(i);


                        %>
                        <option >
                            <%=ha.getMaDeal()%>
                        </option>
                        <%}%>

                    </select>
                </td>

                <td width="69" bgcolor="#999999">&nbsp;</td>
            </tr>

            <tr>
                <td bgcolor="#999999">Hình Ảnh</td>

                <%
                    String duongdan = (String) request.getAttribute("filename");
                %>
                <td bgcolor="#999999">
                    <input type="text" name="txtDuongDan"  value="/Images/<%=duongdan%>"/>
                </td>
                <td bgcolor="#999999"><input type="submit" name="btnUpHinh" value="Browser" /></td>
            </tr>
            <tr>
                <td bgcolor="#999999">Kiểu Hình</td>
                <td bgcolor="#999999"><label for="ddDuongDan"></label>

                    <select name="cbbDuongDan" id="ddDuongDan">

                        <option>-- Chọn Kiểu Hình --</option>
                        <%
                            List<Hinhanh> dsha = hinhAnhDAO.LayHinhAnh();
                            for (int i = 0; i < dsha.size(); i++) {
                                Hinhanh ha = dsha.get(i);


                        %>
                        <option><%=ha.getKieuHinh()%> </option>
                        <%}%>
                    </select></td>
                <td bgcolor="#999999">&nbsp;</td>
            </tr>
            <tr >
                <td colspan="3" bgcolor="#999999" align="center"><input type="submit" name="btnThem" value="Thêm" /></td>
            </tr>
        </table>
    </form>
</div>